flowbox: Don't emit child-activated while dragging the pointer
authorDebarshi Ray <debarshir@gnome.org>
Tue, 20 Dec 2016 11:55:41 +0000 (12:55 +0100)
committerDebarshi Ray <debarshir@gnome.org>
Tue, 20 Dec 2016 17:48:03 +0000 (18:48 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=776306

gtk/gtkflowbox.c

index 69f89c64da5dfe251b18c29c0ae1ae506ddae145..f365f298c9330662ea0462a9b3fd37e21ad94248 100644 (file)
@@ -2992,6 +2992,13 @@ gtk_flow_box_multipress_gesture_released (GtkGestureMultiPress *gesture,
           gtk_flow_box_update_selection (box, priv->active_child, modify, extend);
         }
     }
+}
+
+static void
+gtk_flow_box_multipress_gesture_stopped (GtkGestureMultiPress *gesture,
+                                         GtkFlowBox           *box)
+{
+  GtkFlowBoxPrivate *priv = BOX_PRIV (box);
 
   priv->active_child = NULL;
   priv->active_child_active = FALSE;
@@ -4053,6 +4060,8 @@ gtk_flow_box_init (GtkFlowBox *box)
                     G_CALLBACK (gtk_flow_box_multipress_gesture_pressed), box);
   g_signal_connect (priv->multipress_gesture, "released",
                     G_CALLBACK (gtk_flow_box_multipress_gesture_released), box);
+  g_signal_connect (priv->multipress_gesture, "stopped",
+                    G_CALLBACK (gtk_flow_box_multipress_gesture_stopped), box);
 
   priv->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (box));
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->drag_gesture),